﻿using System;
using System.Xml.Serialization;
using Harvest.Api.Types;

namespace Harvest.Api.Model.Internal
{

  //<client>
  //  <active type="boolean">true</active>
  //  <cache-version type="integer">686784448</cache-version>
  //  <created-at type="datetime">2010-07-23T08:09:26Z</created-at>
  //  <currency>Euro - EUR</currency>
  //  <default-invoice-timeframe nil="true"></default-invoice-timeframe>
  //  <details></details>
  //  <highrise-id type="integer" nil="true"></highrise-id>
  //  <id type="integer">327070</id>
  //  <name>Ciber AG</name>
  //  <updated-at type="datetime">2009-12-10T11:03:15Z</updated-at>
  //  <currency-symbol>&#8364;</currency-symbol>
  //</client>

    /// <summary>
    /// 
    /// </summary>
    /// <remarks>
    /// Don't change the XmlElement attributes, otherwise (de)serialization will fail.
    /// </remarks>
    [XmlRoot(ElementName = "client", IsNullable = false)]
    public class ClientItem
    {

        /// <summary>
        /// 
        /// </summary>
        [XmlElement(ElementName="active", DataType="boolean")]
        public bool Active { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlElement(ElementName = "cache-version")]
        public string CacheVersion { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlElement(ElementName = "created-at", DataType = "dateTime", IsNullable = true)]
        public DateTime? CreatedAt { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlElement(ElementName = "currency")]
        public string Currency { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlElement(ElementName = "default-invoice-timeframe")]
        public string DefaultInvoiceTimeframe { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlElement(ElementName = "details")]
        public string Details { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlElement(ElementName = "highrise-id", IsNullable = true)]
        public NullableInt HighriseId { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlElement(ElementName = "id", IsNullable = true)]
        public NullableInt Id { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlElement(ElementName = "name")]
        public string Name { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlElement(ElementName = "updated-at", DataType = "dateTime", IsNullable = true)]
        public DateTime? UpdatedAt { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlElement(ElementName = "currency-symbol")]
        public string CurrencySymbol { get; set; }

    }

}
